﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using NGinnBPM.Lib.Schema;

namespace NGinnBPM.Lib.Interfaces
{
    /// <summary>
    /// Interface for reading process packages
    /// </summary>
    public interface IProcessPackageStore
    {
        /// <summary>
        /// Get package description
        /// </summary>
        /// <returns></returns>
        PackageDefinition GetPackageDefinition();
        /// <summary>
        /// Get process definition
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        ProcessDefinition GetProcessDefinition(string name);
        ProcessDefinition GetProcessDefinition(string name, int version);
        Stream GetPackageContentStream(string contentName);

        /// <summary>
        /// Return path to a file contained in a package
        /// </summary>
        /// <param name="contentFileName"></param>
        /// <returns></returns>
        string GetPackageContentPath(string contentFileName);
        Stream GetPackageDefinitionStream();

        IList<string> ProcessDefinitionNames
        {
            get;
        }
    }
}
